package model

import "time"

const TableNameHomeUserChange = "home_user_change"

// HomeUserChange mapped from table <home_user_change>
type UserAccountChangeModel struct {
	ID             int64     `gorm:"column:id;primaryKey;comment:流水序号" json:"id"`                           // 流水序号
	UserID         int64     `gorm:"column:user_id;not null;comment:用户序号" json:"user_id"`                   // 用户序号
	BeforeAmount   float64   `gorm:"column:before_amount;not null;comment:变动前金额" json:"before_amount"`      // 变动前金额
	CurrentAmount  float64   `gorm:"column:current_amount;not null;comment:此次变动金额" json:"current_amount"`   // 此次变动金额
	AfterAmount    float64   `gorm:"column:after_amount;not null;comment:变动后金额" json:"after_amount"`        // 变动后金额
	StreamTypeDict int32     `gorm:"column:stream_type_dict;not null;comment:流水类型" json:"stream_type_dict"` // 流水类型
	KeyID          int64     `gorm:"column:key_id;not null;comment:主键序号" json:"key_id"`                     // 主键序号
	ToAddress      string    `gorm:"column:to_address;comment:到账地址" json:"to_address"`                      // 到账地址
	CreatedAt      time.Time `gorm:"column:created_at;comment:创建时间" json:"created_at"`                      // 创建时间
	UpdatedAt      time.Time `gorm:"column:updated_at;comment:更新时间" json:"updated_at"`                      // 更新时间
}

// TableName HomeUserChange's table name
func (*UserAccountChangeModel) TableName() string {
	return TableNameHomeUserChange
}
